package com.jiangxfei.mymvp.config;

import com.jiangxfei.mymvp.app.home.bean.User;

import java.util.List;
import java.util.concurrent.TimeUnit;

import io.reactivex.Observable;
import io.rx_cache2.DynamicKey;
import io.rx_cache2.EvictProvider;
import io.rx_cache2.LifeCache;
import io.rx_cache2.Reply;

public interface CacheService {
    @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)
    Observable<Reply<List<User>>> getUsers(Observable<List<User>> users,
                                           DynamicKey idLastUserQueried,
                                           EvictProvider evictProvider);
}
